package com.neoCalf.neoGroup.feigns;


import com.neoCalf.neoCommon.entity.ChatMessage;
import com.neoCalf.neoCommon.entity.ChatSession;
import com.neoCalf.neoCommon.entity.Session;
import com.neoCalf.neoCommon.model.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import javax.validation.constraints.NotNull;

@FeignClient(value = "chatService", path = "/api")
public interface ChatServiceFeign {
    @PostMapping("/chat/addSession")
    R<String> addSession(@RequestBody Session session);

    @PostMapping("/chat/addChatSession")
    R<String> addChatSession(@RequestBody ChatSession chatSession);

    @PostMapping("/chat/addChatMessage")
    R<String> addChatMessage(@RequestBody ChatMessage chatMessage);

    @PostMapping("/chat/updateChatSession")
    R<String> updateChatSession(@RequestBody ChatSession chatSession);

    @PostMapping("/chat/updateSession")
    void updateSession(@RequestBody Session session);
}
